3.96 \(\int x^2 \cos ^3(a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=160 \[ \frac {x^3 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{3 \left (b^2 n^2+1\right )}+\frac {b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos ^2\left (a+b \log \left (c x^n\right )\right )}{3 \left (b^2 n^2+1\right )}+\frac {2 b^2 n^2 x^3 \cos \left (a+b \log \left (c x^n\right )\right )}{b^4 n^4+10 b^2 n^2+9}+\frac {2 b^3 n^3 x^3 \sin \left (a+b \log \left (c x^n\right )\right )}{3 \left (b^4 n^4+10 b^2 n^2+9\right )} \]

[Out]

2*b^2*n^2*x^3*cos(a+b*ln(c*x^n))/(b^4*n^4+10*b^2*n^2+9)+1/3*x^3*cos(a+b*ln(c*x^n))^3/(b^2*n^2+1)+2/3*b^3*n^3*x
^3*sin(a+b*ln(c*x^n))/(b^4*n^4+10*b^2*n^2+9)+1/3*b*n*x^3*cos(a+b*ln(c*x^n))^2*sin(a+b*ln(c*x^n))/(b^2*n^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4488, 4486} \[ \frac {2 b^3 n^3 x^3 \sin \left (a+b \log \left (c x^n\right )\right )}{3 \left (b^4 n^4+10 b^2 n^2+9\right )}+\frac {x^3 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{3 \left (b^2 n^2+1\right )}+\frac {2 b^2 n^2 x^3 \cos \left (a+b \log \left (c x^n\right )\right )}{b^4 n^4+10 b^2 n^2+9}+\frac {b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos ^2\left (a+b \log \left (c x^n\right )\right )}{3 \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Int[x^2*Cos[a + b*Log[c*x^n]]^3,x]

[Out]

(2*b^2*n^2*x^3*Cos[a + b*Log[c*x^n]])/(9 + 10*b^2*n^2 + b^4*n^4) + (x^3*Cos[a + b*Log[c*x^n]]^3)/(3*(1 + b^2*n
^2)) + (2*b^3*n^3*x^3*Sin[a + b*Log[c*x^n]])/(3*(9 + 10*b^2*n^2 + b^4*n^4)) + (b*n*x^3*Cos[a + b*Log[c*x^n]]^2
*Sin[a + b*Log[c*x^n]])/(3*(1 + b^2*n^2))

Rule 4486

Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]*((e_.)*(x_))^(m_.), x_Symbol] :> Simp[((m + 1)*(e*x)^(m +
 1)*Cos[d*(a + b*Log[c*x^n])])/(b^2*d^2*e*n^2 + e*(m + 1)^2), x] + Simp[(b*d*n*(e*x)^(m + 1)*Sin[d*(a + b*Log[
c*x^n])])/(b^2*d^2*e*n^2 + e*(m + 1)^2), x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b^2*d^2*n^2 + (m + 1)^2,
 0]

Rule 4488

Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Simp[((m + 1)*(e*x)
^(m + 1)*Cos[d*(a + b*Log[c*x^n])]^p)/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x] + (Dist[(b^2*d^2*n^2*p*(p - 1))/(b
^2*d^2*n^2*p^2 + (m + 1)^2), Int[(e*x)^m*Cos[d*(a + b*Log[c*x^n])]^(p - 2), x], x] + Simp[(b*d*n*p*(e*x)^(m +
1)*Sin[d*(a + b*Log[c*x^n])]*Cos[d*(a + b*Log[c*x^n])]^(p - 1))/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x]) /; Free
Q[{a, b, c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]

Rubi steps

\begin {align*} \int x^2 \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {x^3 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{3 \left (1+b^2 n^2\right )}+\frac {b n x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{3 \left (1+b^2 n^2\right )}+\frac {\left (2 b^2 n^2\right ) \int x^2 \cos \left (a+b \log \left (c x^n\right )\right ) \, dx}{3 \left (1+b^2 n^2\right )}\\ &=\frac {2 b^2 n^2 x^3 \cos \left (a+b \log \left (c x^n\right )\right )}{9+10 b^2 n^2+b^4 n^4}+\frac {x^3 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{3 \left (1+b^2 n^2\right )}+\frac {2 b^3 n^3 x^3 \sin \left (a+b \log \left (c x^n\right )\right )}{3 \left (9+10 b^2 n^2+b^4 n^4\right )}+\frac {b n x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{3 \left (1+b^2 n^2\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.56, size = 120, normalized size = 0.75 \[ \frac {x^3 \left (27 \left (b^2 n^2+1\right ) \cos \left (a+b \log \left (c x^n\right )\right )+\left (b^2 n^2+9\right ) \cos \left (3 \left (a+b \log \left (c x^n\right )\right )\right )+2 b n \sin \left (a+b \log \left (c x^n\right )\right ) \left (\left (b^2 n^2+9\right ) \cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+5 b^2 n^2+9\right )\right )}{12 \left (b^4 n^4+10 b^2 n^2+9\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Cos[a + b*Log[c*x^n]]^3,x]

[Out]

(x^3*(27*(1 + b^2*n^2)*Cos[a + b*Log[c*x^n]] + (9 + b^2*n^2)*Cos[3*(a + b*Log[c*x^n])] + 2*b*n*(9 + 5*b^2*n^2
+ (9 + b^2*n^2)*Cos[2*(a + b*Log[c*x^n])])*Sin[a + b*Log[c*x^n]]))/(12*(9 + 10*b^2*n^2 + b^4*n^4))

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 127, normalized size = 0.79 \[ \frac {6 \, b^{2} n^{2} x^{3} \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right ) + {\left (b^{2} n^{2} + 9\right )} x^{3} \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{3} + {\left (2 \, b^{3} n^{3} x^{3} + {\left (b^{3} n^{3} + 9 \, b n\right )} x^{3} \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{2}\right )} \sin \left (b n \log \relax (x) + b \log \relax (c) + a\right )}{3 \, {\left (b^{4} n^{4} + 10 \, b^{2} n^{2} + 9\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cos(a+b*log(c*x^n))^3,x, algorithm="fricas")

[Out]

1/3*(6*b^2*n^2*x^3*cos(b*n*log(x) + b*log(c) + a) + (b^2*n^2 + 9)*x^3*cos(b*n*log(x) + b*log(c) + a)^3 + (2*b^
3*n^3*x^3 + (b^3*n^3 + 9*b*n)*x^3*cos(b*n*log(x) + b*log(c) + a)^2)*sin(b*n*log(x) + b*log(c) + a))/(b^4*n^4 +
 10*b^2*n^2 + 9)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cos(a+b*log(c*x^n))^3,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 0.08, size = 0, normalized size = 0.00 \[ \int x^{2} \left (\cos ^{3}\left (a +b \ln \left (c \,x^{n}\right )\right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cos(a+b*ln(c*x^n))^3,x)

[Out]

int(x^2*cos(a+b*ln(c*x^n))^3,x)

________________________________________________________________________________________

maxima [B]  time = 0.41, size = 1007, normalized size = 6.29 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cos(a+b*log(c*x^n))^3,x, algorithm="maxima")

[Out]

1/24*(((b^3*cos(3*b*log(c))*sin(6*b*log(c)) - b^3*cos(6*b*log(c))*sin(3*b*log(c)) + b^3*sin(3*b*log(c)))*n^3 +
 (b^2*cos(6*b*log(c))*cos(3*b*log(c)) + b^2*sin(6*b*log(c))*sin(3*b*log(c)) + b^2*cos(3*b*log(c)))*n^2 + 9*(b*
cos(3*b*log(c))*sin(6*b*log(c)) - b*cos(6*b*log(c))*sin(3*b*log(c)) + b*sin(3*b*log(c)))*n + 9*cos(6*b*log(c))
*cos(3*b*log(c)) + 9*sin(6*b*log(c))*sin(3*b*log(c)) + 9*cos(3*b*log(c)))*x^3*cos(3*b*log(x^n) + 3*a) + 9*((b^
3*cos(3*b*log(c))*sin(4*b*log(c)) - b^3*cos(4*b*log(c))*sin(3*b*log(c)) + b^3*cos(2*b*log(c))*sin(3*b*log(c))
- b^3*cos(3*b*log(c))*sin(2*b*log(c)))*n^3 + 3*(b^2*cos(4*b*log(c))*cos(3*b*log(c)) + b^2*cos(3*b*log(c))*cos(
2*b*log(c)) + b^2*sin(4*b*log(c))*sin(3*b*log(c)) + b^2*sin(3*b*log(c))*sin(2*b*log(c)))*n^2 + (b*cos(3*b*log(
c))*sin(4*b*log(c)) - b*cos(4*b*log(c))*sin(3*b*log(c)) + b*cos(2*b*log(c))*sin(3*b*log(c)) - b*cos(3*b*log(c)
)*sin(2*b*log(c)))*n + 3*cos(4*b*log(c))*cos(3*b*log(c)) + 3*cos(3*b*log(c))*cos(2*b*log(c)) + 3*sin(4*b*log(c
))*sin(3*b*log(c)) + 3*sin(3*b*log(c))*sin(2*b*log(c)))*x^3*cos(b*log(x^n) + a) + ((b^3*cos(6*b*log(c))*cos(3*
b*log(c)) + b^3*sin(6*b*log(c))*sin(3*b*log(c)) + b^3*cos(3*b*log(c)))*n^3 - (b^2*cos(3*b*log(c))*sin(6*b*log(
c)) - b^2*cos(6*b*log(c))*sin(3*b*log(c)) + b^2*sin(3*b*log(c)))*n^2 + 9*(b*cos(6*b*log(c))*cos(3*b*log(c)) +
b*sin(6*b*log(c))*sin(3*b*log(c)) + b*cos(3*b*log(c)))*n - 9*cos(3*b*log(c))*sin(6*b*log(c)) + 9*cos(6*b*log(c
))*sin(3*b*log(c)) - 9*sin(3*b*log(c)))*x^3*sin(3*b*log(x^n) + 3*a) + 9*((b^3*cos(4*b*log(c))*cos(3*b*log(c))
+ b^3*cos(3*b*log(c))*cos(2*b*log(c)) + b^3*sin(4*b*log(c))*sin(3*b*log(c)) + b^3*sin(3*b*log(c))*sin(2*b*log(
c)))*n^3 - 3*(b^2*cos(3*b*log(c))*sin(4*b*log(c)) - b^2*cos(4*b*log(c))*sin(3*b*log(c)) + b^2*cos(2*b*log(c))*
sin(3*b*log(c)) - b^2*cos(3*b*log(c))*sin(2*b*log(c)))*n^2 + (b*cos(4*b*log(c))*cos(3*b*log(c)) + b*cos(3*b*lo
g(c))*cos(2*b*log(c)) + b*sin(4*b*log(c))*sin(3*b*log(c)) + b*sin(3*b*log(c))*sin(2*b*log(c)))*n - 3*cos(3*b*l
og(c))*sin(4*b*log(c)) + 3*cos(4*b*log(c))*sin(3*b*log(c)) - 3*cos(2*b*log(c))*sin(3*b*log(c)) + 3*cos(3*b*log
(c))*sin(2*b*log(c)))*x^3*sin(b*log(x^n) + a))/((b^4*cos(3*b*log(c))^2 + b^4*sin(3*b*log(c))^2)*n^4 + 10*(b^2*
cos(3*b*log(c))^2 + b^2*sin(3*b*log(c))^2)*n^2 + 9*cos(3*b*log(c))^2 + 9*sin(3*b*log(c))^2)

________________________________________________________________________________________

mupad [B]  time = 3.06, size = 122, normalized size = 0.76 \[ \frac {x^3\,{\mathrm {e}}^{-a\,1{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}}\,3{}\mathrm {i}}{8\,b\,n+24{}\mathrm {i}}+\frac {3\,x^3\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}}{24+b\,n\,8{}\mathrm {i}}+\frac {x^3\,{\mathrm {e}}^{-a\,3{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,3{}\mathrm {i}}}\,1{}\mathrm {i}}{24\,b\,n+24{}\mathrm {i}}+\frac {x^3\,{\mathrm {e}}^{a\,3{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,3{}\mathrm {i}}}{24+b\,n\,24{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cos(a + b*log(c*x^n))^3,x)

[Out]

(x^3*exp(-a*1i)/(c*x^n)^(b*1i)*3i)/(8*b*n + 24i) + (3*x^3*exp(a*1i)*(c*x^n)^(b*1i))/(b*n*8i + 24) + (x^3*exp(-
a*3i)/(c*x^n)^(b*3i)*1i)/(24*b*n + 24i) + (x^3*exp(a*3i)*(c*x^n)^(b*3i))/(b*n*24i + 24)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*cos(a+b*ln(c*x**n))**3,x)

[Out]

Timed out

________________________________________________________________________________________